import { REACT_TEXT } from "./constants";

/**
 * 处理一下模板中字符串和数字
 * @param {*} element 
 * @returns 
 */
export function wrapToVdom(element){
    return typeof element === 'string' || typeof element === 'number'?
    {type:REACT_TEXT,props:element}:
    element
}